<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="ko" xml:lang="ko">
<head>
	<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
	<meta name="Keywords" content="(주)상산 오수처리시설 중앙관리 시스템" />
	<meta name="decription" content="(주)상산 오수처리시설 중앙관리 시스템 입니다." />
	<title>(주)상산</title>
	<!--<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" />-->
	<script type="text/javascript" src="<c:url value='/htmlRes/js/jquery-1.10.2.js'/>"></script>
	<link rel="stylesheet" type="text/css" href="<c:url value='/htmlRes/css/print_style.css'/>" />
	<script type="text/javascript">
	function printDiv(){
		$('.print_bottom').hide();
		$('.ico_print').hide();
		window.print();
		$('.print_bottom').show();
		$('.ico_print').show();
	}
	</script>
</head>

<body class="bg_none print_area">
	<div class="print_wrap">
		<div class="header" style="height: 80px;">
			<div class="top">
	        	<div class="left">
					<h1 class="tit_h1" id="logo">주식회사 상산 <span>오수처리시설 중앙관리시스템</span></h1>
				</div>
				<div class="ico_print">
					<span><a href="#print" onclick="printDiv();return false;"><img src="/htmlRes/images/ico_print.jpg" alt="인쇄버튼" /></a></span>
				</div>
			</div>
		</div>
		<div class="contents">
			<div class="sign_box">
				<div class="date">
					<h1>오수처리시설 점검일지</h1>
					<br /><h2> ${dateAsString }</h2>
				</div>
				<div class="sign">
					<table summary="오수처리시설 점검일지 결제테이블 입니다" class="table_sign">
						<caption>오수처리시설 점검일지 결제테이블</caption>
						<colgroup>
							<col span="4" width="25%" />
						</colgroup>
						<tbody>
							<tr>
								<th scope="col" rowspan="2">결재</th>
								<th scope="col">담당</th>
								<th scope="col">시설담당</th>
								<th scope="col">소장</th>
							</tr>
							<tr>
								<td>&nbsp;</td>
								<td>&nbsp;</td>
								<td>&nbsp;</td>
							</tr>
						</tbody>
					</table>
				</div>
			</div>
			<div class="table_section01">
				<div class="section01">
					<p class="system_name">1. 오수발생량(㎥/day)</p>
					<table summary="오수발생량(㎥/day) 테이블 입니다" class="table_system">
						<caption>오수발생량(㎥/day)테이블</caption>
						<colgroup>
							<col span="4" width="25%" />
						</colgroup>
						<thead>
							<tr>
								<th scope="col">구분</th>
								<th scope="col">전일지침</th>
								<th scope="col">금일지침</th>
								<th scope="col">발생량</th>
							</tr>
						</thead>
						<tbody>
							<tr>
								<td>유입량</td>
								<td>${resultVO.pre_sdl_iflow_dwater }&nbsp;</td>
								<td>${resultVO.sdl_iflow_dwater }&nbsp;</td>
								<td>${resultVO.sdl_iflow_dwater-resultVO.pre_sdl_iflow_dwater }&nbsp;</td>
							</tr>
							<tr>
								<td>방류량</td>
								<td>${resultVO.pre_sdl_oflow_dwater }&nbsp;</td>
								<td>${resultVO.sdl_oflow_dwater }&nbsp;</td>
								<td>${resultVO.sdl_oflow_dwater-resultVO.pre_sdl_oflow_dwater }&nbsp;</td>
							</tr>
						</tbody>
					</table>

					<p class="system_name">2. 전력사용량(kwh)</p>
					<table summary="전력사용량(kwh) 테이블 입니다" class="table_system">
						<caption>전력사용량(kwh)</caption>
						<colgroup>
							<col span="3" width="33.3%" />
						</colgroup>
						<thead>
							<tr>
								<th scope="col">전일지침</th>
								<th scope="col">금일지침</th>
								<th scope="col">사용량</th>
							</tr>
						</thead>
						<tbody>
							<tr>
								<td>${resultVO.pre_sdl_elect_number }&nbsp;</td>
								<td>${resultVO.sdl_elect_number }&nbsp;</td>
								<td>${resultVO.sdl_elect_number-resultVO.pre_sdl_elect_number }&nbsp;</td>
							</tr>
						</tbody>
					</table>

					<p class="system_name">3. 슬러지 처리량(㎥)</p>
					<table summary="슬러지 처리량(㎥) 테이블 입니다" class="table_system">
						<caption>슬러지 처리량(㎥)테이블</caption>
						<colgroup>
							<col span="3" width="33.3%" />
						</colgroup>
						<thead>
							<tr>
								<th scope="col">업체명</th>
								<th scope="col">처리량</th>
								<th scope="col">금액(원)</th>
							</tr>
						</thead>
						<tbody>
							<tr>
								<td>${resultVO.sdl_sludge_comp }&nbsp;</td>
								<td><c:if test="${resultVO.sdl_sludge_volm ne '0'}">${resultVO.sdl_sludge_volm}</c:if>&nbsp;</td>
								<td><fmt:formatNumber value="${resultVO.sdl_sludge_cost }" />&nbsp;</td>
							</tr>
						</tbody>
					</table>
				</div><!--//section01-->

				<div class="section02">
					<p class="system_name">4. 약품사용량(kg, L)</p>
					<table summary="약품사용량(kg, L) 테이블 입니다" class="table_system">
						<caption>약품사용량(kg, L)테이블</caption>
						<colgroup>
							<col width="30%" />
							<col width="23.3%" />
							<col width="23.3%" />
							<col width="23.3%" />
						</colgroup>
						<thead>
							<tr>
								<th scope="col">약품명</th>
								<th scope="col">재고량</th>
								<th scope="col">사용량</th>
								<th scope="col">반입량</th>
							</tr>
						</thead>
						<tbody>
						<c:if test="${not empty resultVO.invenVOList}">
							<c:forEach var="result" items="${resultVO.invenVOList }" varStatus="status"> 
							<tr>
								<td>${result.sui_code_name }</td>
								<td>${result.sui_total_stock }</td>
								<td>${result.sui_use_num }</td>
								<td>${result.sui_in_num }</td>
							</tr>
							</c:forEach>
						</c:if>
						</tbody>
					</table>
				</div><!--//section02-->

			</div><!--//table_section01-->
			<div class="table_section02">
				<div class="section03">
					<p class="system_name">5. 기기류 점검 및 작업사항</p>
					<table summary="기기류 점검 및 작업사항 입니다" class="table_system">
						<caption>기기류 점검 및 작업사항 테이블</caption>
						<colgroup>
							<col width="30%" />
							<col width="10%" />
							<col width="60%" />
						</colgroup>
						<thead>
							<tr>
								<th scope="col">항목</th>
								<th scope="col">점검결과</th>
								<th scope="col">점검내용</th>
							</tr>
						</thead>
						<tbody>
							<c:set var="machineCnt" value="0" />
							<c:forEach var="result" items="${resultVO.dailyMachineVOList }" varStatus="status">
							<c:if test="${not empty result.scm_check_name}">
								<c:set var="machineCnt" value="${machineCnt }+1" />
								<tr>
									<td>${result.scm_check_name }</td>
									<td>
										<c:if test="${result.scm_check_result eq 'A'}">양호</c:if>
										<c:if test="${result.scm_check_result eq 'B'}">보통</c:if>
										<c:if test="${result.scm_check_result eq 'C'}">불량</c:if>
									</td>
									<td>${result.scm_check_note }</td>
								</tr>
							</c:if>
							</c:forEach>
							<c:if test="${machineCnt == 0}">
								<tr>
									<td colspan="3">기기류 점검 및 작업사항 없음.</td>
								</tr>
							</c:if>
						</tbody>
					</table>
				</div>
				<div class="section04">
				<p class="system_name">6. 방류수질결과 <span class="notefoot">(단위:mg/L, 총대장균:개/mL)</span></p>
					<table summary="기기류 점검 및 작업사항 입니다" class="table_system">
						<caption>기기류 점검 및 작업사항 테이블</caption>
						<colgroup>
							<col span="6" width="16.6%" />
						</colgroup>
						<thead>
							<tr>
								<th scope="col">항목</th>
								<th scope="col">BOD</th>
								<th scope="col">SS</th>
								<th scope="col">T-N</th>
								<th scope="col">T-P</th>
								<th scope="col">총대장균</th>
							</tr>
						</thead>
						<tbody>
							<tr>
								<td>수질기준</td>
								<td>10</td>
								<td>10</td>
								<td>20</td>
								<td>2</td>
								<td>3000m/ml</td>
							</tr>
							<tr>
								<td>방류수질</td>
								<td>${resultVO.sdl_bod_num }</td>
								<td>${resultVO.sdl_ss_num }</td>
								<td>${resultVO.sdl_tn_num }</td>
								<td>${resultVO.sdl_tp_num }</td>
								<td>${resultVO.sdl_ec_num }</td>
							</tr>
						</tbody>
					</table>
				</div>
				<div class="section04">
					<c:set var="sdl_unusual" value="<span style='color:green;font-weight:bold;'>보통</span>" />
					<c:if test="${resultVO.sdl_unusual_yn ne 'Y'}"><c:set var="sdl_unusual" value="<span style='color:red;font-weight:bold;'>심각</span>" /></c:if>
					<p class="system_name">7. 특이사항 - ${sdl_unusual }</p>
					<table summary="특이사항 (보통/심각)구분 입니다" class="table_system">
						<caption>특이사항 (보통/심각)구분 테이블</caption>
						<colgroup>
							<col width="100%" />
						</colgroup>
						<thead>
							<tr>
								<th scope="col">내용</th>
							</tr>
						</thead>
						<tbody>
							<tr>
								<td class="height_s">${resultVO.sdl_unusual_cont}&nbsp;</td>
							</tr>
						</tbody>
					</table>
				</div>
			</div><!--//table_section02-->
		</div>
	</div>
	<div class="print_bottom">
		<span><a href="#closePop" class="close" onclick="self.close();return false;">창닫기</a></span>
	</div>
</body>
</html>

